package com.iasku.util;

import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;
import java.util.Date;

@SuppressLint("SimpleDateFormat")
public class DateUtil {
    @SuppressLint("SimpleDateFormat")
    public static String getDateTime(long timelong){
        SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日");
        return sdf.format(new Date(timelong * 1000L));
    }
    
    public static long parserStr2Date(String str) throws Exception {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.parse(str).getTime() / 1000;
    }
}
